<#include "/common/_layout.html"/>
<@layout>
<script type="text/javascript">
<!--
jQuery(document).ready(function(){
	jQuery('#termSelect').val(${(history.term)!});
	jQuery('#termSelect').change(function(){
		var term = jQuery('#termSelect').val();
		window.location = "/history?term="+term;
	});
});
//-->
</script>
<style>
.history-head{float:left;font-size:30px;margin-top:10px;}
.history-font{float:left;font-size:30px;margin-top:10px;}
.history-terms{width:120px;margin-top:10px;float:left;}
</style>
<!-- Fixed navbar -->
<nav class="navbar navbar-default navbar-fixed-top">
  <div class="container">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" style="color:#fff;" href="http://www.cpzhi.com">彩票志</a>
    </div>
    <div id="navbar" class="navbar-collapse collapse">
      
      <ul class="nav navbar-nav navbar-right">
        <li><a href="/">首页</a></li>
        <li class="active"><a href="/history">往期预测</a></li>
        <li><a href="/forecast">预测算法</a></li>
        <li><a href="/about">关于我们</a></li>
      </ul>
    </div><!--/.nav-collapse -->
  </div>
</nav>

<div class="container">

<div class="row">
<div class="col-md-12">
	<div class="history-head"><div class="history-font">第</div>
	<select class="history-terms form-control" id="termSelect">
		<#list terms as x>
		<option value ="${x}">${x}</option>
		</#list>
	</select><div class="history-font">期预测</div></div>
</div>
</div>
<div class="row">
<div class="col-md-8">
	<div class="empty-line"><h3>红球</h3>中${(ra.sucNum15)!}个</div>
	<div class="ball">
		<#list red as x>
		<#if x_index lt 15>
		<div class="red-empty">${x}</div>
		</#if>
		</#list>
	</div>
	<div class="empty-line"><h3>蓝球</h3>中${(ba.sucNum6)!}个</div>
	<div class="ball">
		<#list blue as x>
		<#if x_index lt 5>
		<div class="blue-empty">${x}</div>
		</#if>
		</#list>
	</div>
</div>
<div class="col-md-4">
	<h2>第${(history.term)!}期开奖公告</h2>
	<div class="ball">
		<div class="red-full">${(history.red1)!}</div>
		<div class="red-full">${(history.red2)!}</div>
		<div class="red-full">${(history.red3)!}</div>
		<div class="red-full">${(history.red4)!}</div>
		<div class="red-full">${(history.red5)!}</div>
		<div class="red-full">${(history.red6)!}</div>
		<div class="blue-full">${(history.blue)!}</div>
	</div>
	<table class="table table-hover table-condensed">
	  <tr>
	  <th>奖项</th><th>中奖注数</th><th>单注奖金</th><th>中奖条件</th>
	  </tr>
	  <tr>
	  <td>一等奖</td><td>${(reward.lvl1)!}</td><td>${(reward.lvl1money)!}</td><td>6+1</td>
	  </tr>
	  <tr>
	  <td>二等奖</td><td>${(reward.lvl2)!}</td><td>${(reward.lvl2money)!}</td><td>6+0</td>
	  </tr>
	  <tr>
	  <td>三等奖</td><td>${(reward.lvl3)!}</td><td>3000</td><td>5+1</td>
	  </tr>
	  <tr>
	  <td>四等奖</td><td>${(reward.lvl4)!}</td><td>200</td><td>5+0/4+1</td>
	  </tr>
	  <tr>
	  <td>五等奖</td><td>${(reward.lvl5)!}</td><td>10</td><td>4+0/3+1</td>
	  </tr>
	  <tr>
	  <td>六等奖</td><td>${(reward.lvl6)!}</td><td>5</td><td>2+1/1+1/0+1</td>
	  </tr>
	</table>
</div>
</div>
<div class="row">
<h2>近期开奖详情</h2>
<table class="table table-hover table-condensed">
	  <tr>
	  <th>期次</th><th>中奖号球索引</th><th>红球中奖个数</th><th>近100期红球平均中奖个数</th><th>近10期红球平均中奖个数</th><th>蓝球中奖索引</th><th>蓝球是否中奖</th><th>近100期蓝球中奖个数</th><th>近10期蓝球中奖个数</th>
	  </tr>
		<#list spav as x>
		<tr>
	  <td>${x.term}</td><td>${x.redSucIndex}</td><td>${x.redSucNum15}</td><td>${x.redSuc100}</td><td>${x.redSuc10}</td><td>${x.blueFactIndex}</td><td>${x.blueSucNum6}</td><td>${x.blueSuc100}</td><td>${x.blueSuc10}</td>
	  </tr>
		</#list>
	  
	</table>
</div>
</div> <!-- /container -->
</@layout>